/* Compressed with CompressRexx v2.1, (C) 1993-96 Robert Hofmann */
OPTIONS RESULTS;"Say /me has told Kryten to open the bar...Type #Menu to get the menu, and # followed by the snack you want, to get it - |DWaRFMeNU|";"Say /Topic The DWaRFBaR is now open, Kryten will take your order.....Type #Menu for the Menu - DWaRFx";meals = "";Open(1,"AmIRC:Rexx/DWaRFx/DWaRFMeNU","R");Do Forever;line = Upper(Readln(1));If line = "" Then Leave;meal = Word(line,1);meals = meals" "meal;desc.meal = Subword(line,2,Words(line));End;Close(1);Do Forever;"Getmynick" ; mynick = Result;Drop rest;Drop prefix;"Getline";rest = Upper(Line.rest);IF LEFT(rest,1) = ":" THEN rest = RIGHT(rest,LENGTH(rest)-1);prefix = line.prefix;Do loop = 1 To Length(prefix);If Right(Left(prefix,loop),1) = "!" Then Leave;End loop;nick = Left(prefix,loop-1);drink = Compress(rest,"#");"cho DWaRFBaR: "drink;Call Setclip('DFxTIME',Time());If Upper(rest) = "#QUIT" Then Leave;If Upper(rest) = "#MENU" Then Do;"Say /Msg "nick" "D2c(2)"====> DWaRF MeNU <===="D2c(2)
"Say /Msg "nick" The Menu is coming up. To order type # followed by the name of the meal/drink";"Say /Msg "nick" "D2c(2)" "D2c(2);"say /dcc send "nick" AmIRC:rexx/DWaRFx/DWaRFMeNU";Do loop = 1 To Words(meals);meal = Word(meals,loop);"ech "nick" "D2c(2)||meal||D2c(2)" "desc.meal;End;Drop rest;End;If Substr(rest,1,1) = "#" then do;If Find(meals,drink) ~= 0 Then Do;"Say /Me hands "nick" "desc.drink;End;Else Do;"Say /Msg "nick" sorry we dont serve that here.. Please have a look at the menu.";End;End;End;"Say /Me has told Kryten to shut down the bar, he's too smegging tired...";Exit